﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000371 RID: 881
	public class TViewAliasItem : TParseTreeNode
	{
		// Token: 0x170007F1 RID: 2033
		// (get) Token: 0x060024D1 RID: 9425 RVA: 0x00339200 File Offset: 0x00337400
		// (set) Token: 0x060024D2 RID: 9426 RVA: 0x00339208 File Offset: 0x00337408
		public virtual TObjectName Alias
		{
			get
			{
				return this.alias;
			}
			set
			{
				this.alias = value;
			}
		}

		// Token: 0x170007F2 RID: 2034
		// (get) Token: 0x060024D3 RID: 9427 RVA: 0x00339211 File Offset: 0x00337411
		// (set) Token: 0x060024D4 RID: 9428 RVA: 0x00339219 File Offset: 0x00337419
		public virtual TConstraintList ColumnConstraintList
		{
			get
			{
				return this.columnConstraintList;
			}
			set
			{
				this.columnConstraintList = value;
			}
		}

		// Token: 0x170007F3 RID: 2035
		// (get) Token: 0x060024D5 RID: 9429 RVA: 0x00339222 File Offset: 0x00337422
		// (set) Token: 0x060024D6 RID: 9430 RVA: 0x0033922A File Offset: 0x0033742A
		public virtual TConstraint TableConstraint
		{
			get
			{
				return this.tableConstraint;
			}
			set
			{
				this.tableConstraint = value;
			}
		}

		// Token: 0x060024D7 RID: 9431 RVA: 0x00339234 File Offset: 0x00337434
		public override void init(object arg1, object arg2)
		{
			if (arg1 != null)
			{
				this.alias = (TObjectName)arg1;
				this.alias.ObjectType = 25;
			}
			if (arg2 != null)
			{
				if (arg2 is TConstraint)
				{
					this.tableConstraint = (TConstraint)arg2;
					return;
				}
				if (arg2 is TConstraintList)
				{
					this.columnConstraintList = (TConstraintList)arg2;
				}
			}
		}

		// Token: 0x060024D8 RID: 9432 RVA: 0x00339289 File Offset: 0x00337489
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.tableConstraint != null)
			{
				this.tableConstraint.doParse(psql, plocation);
				return;
			}
			if (this.columnConstraintList != null)
			{
				this.columnConstraintList.doParse(psql, plocation);
			}
		}

		// Token: 0x060024D9 RID: 9433 RVA: 0x003392B6 File Offset: 0x003374B6
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060024DA RID: 9434 RVA: 0x003392C6 File Offset: 0x003374C6
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001C9C RID: 7324
		private TObjectName alias;

		// Token: 0x04001C9D RID: 7325
		private TConstraint tableConstraint;

		// Token: 0x04001C9E RID: 7326
		private TConstraintList columnConstraintList;
	}
}
